package com.videos.controller;

import lombok.extern.slf4j.Slf4j;

import java.io.Serializable;
import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * @author mis_wu
 * @date 2022/3/10 19:44
 */
@Slf4j
public class Test {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        List<String> list1 = new ArrayList<>();
        list.add(0,"one");
        list.add(1,"tow");
        list.add("我得第三个");
        list.add(2,"第几个");
        System.out.println(list);
        Collections.sort(list);
        System.out.println(list);
        Collections.reverse(list);
        System.out.println(list);
        Collections.shuffle(list);
        System.out.println(list);
        Collections.fill(list,"admin");
        System.out.println(list);
        System.out.println("----");
        list1.add("list1");
        list1.add("list2");
        list1.add("list3");
        list1.add("list4");
        Collections.copy(list,list1);
        System.out.println(list);
        System.out.println(list1);
        System.out.println("--");
        Collections.min(list);
        System.out.println(list);
        System.out.println("tihuan");
        list.add("list3");
        System.out.println(list);
        Collections.replaceAll(list,"list3","admin+n");
        System.out.println(list);
        String max = Collections.max(list);
        System.out.println(max);
        System.out.println("-------------------------");
        List<Integer> asList = Arrays.asList(1, 2, 4, 5, 9, 6);
        System.out.println(asList);
        Stream<Integer> stream = asList.stream();
        System.out.println(stream);
        Stream<? extends Serializable> stream1 = stream.filter((item) -> item > 4);
        System.out.println(stream1.toArray());
        Boolean a = false;
    }
}